package com.googlecode.cswish.struts.hibernate;

import java.io.Serializable;

// TODO: extends 'ModelField'?
public class DPropertyInfo implements Serializable {
	private static final long serialVersionUID = -8973525509713444403L;
	
	public String name;
	public String type;
	public String genericType;
	
	public String i18nKey;
	public boolean transientProperty;
	public boolean hasDbColumn;				// a display flag to identify if db has this property
	
	public int length;
	public boolean nullable;
	public boolean unique;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getGenericType() {
		return genericType;
	}
	public void setGenericType(String genericType) {
		this.genericType = genericType;
	}
	public String getI18nKey() {
		return i18nKey;
	}
	public void setI18nKey(String i18nKey) {
		this.i18nKey = i18nKey;
	}
	public boolean isTransientProperty() {
		return transientProperty;
	}
	public void setTransientProperty(boolean transientProperty) {
		this.transientProperty = transientProperty;
	}
	public boolean isHasDbColumn() {
		return hasDbColumn;
	}
	public void setHasDbColumn(boolean hasDbColumn) {
		this.hasDbColumn = hasDbColumn;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public boolean isNullable() {
		return nullable;
	}
	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}
	public boolean isUnique() {
		return unique;
	}
	public void setUnique(boolean unique) {
		this.unique = unique;
	}
	@Override
	public String toString() {
		return this.name;
	}
}
